1. Field of the Invention
The present invention relates generally to digital photography using flash, and specifically to filtering “Red Eye” artifacts from digital images shot by digital cameras or scanned by a digital scanner as part of an image acquisition process or an image printing process.
2. Description of the Related Art
i. Red Eye Phenomenon
“Red-eye” is a phenomenon in flash photography where a flash is reflected within a subject's eye and appears in a photograph as a red dot where the black pupil of the subject's eye would normally appear. The unnatural glowing red of an eye is due to internal reflections from the vascular membrane behind the retina, which is rich in blood vessels. This objectionable phenomenon is well understood to be caused in part by a small angle between the flash of the camera and the lens of the camera. This angle has decreased with the miniaturization of cameras with integral flash capabilities. Additional contributors include the relative closeness of the subject to the camera, iris color where light eyes are more susceptible to this artifact and low ambient light levels which means the pupils are dilated.
The red-eye phenomenon can be somewhat minimized by causing the iris to reduce the opening of the pupil. This is typically done with a “pre-flash”, a flash or illumination of light shortly before a flash photograph is taken or a strong additional light source. This causes the iris to close. Unfortunately, these techniques typically delay the photographic exposure process by 0.5 second or more to allow for the pupil to contract. Such delay may cause the user to move, the subject to turn away, etc. Therefore, these techniques, although somewhat useful in removing the red-eye artifact, can cause new unwanted results.
ii. Digital Cameras and Red Eye Artifacts
Digital cameras are becoming more popular and smaller in size. Digital cameras have several advantages over film cameras, e.g. eliminating the need for film as the image is digitally captured and stored in a memory array for display on a display screen on the camera itself. This allows photographs to be viewed and enjoyed virtually instantaneously as opposed to waiting for film processing. Furthermore, the digitally captured image may be downloaded to another display device such as a personal computer or color printer for further enhanced viewing. Digital cameras include microprocessors for image processing and compression and camera systems control. Nevertheless, without a pre-flash, both digital and film cameras can capture the red-eye phenomenon as the flash reflects within a subject's eye. Thus, what is desired is a method of eliminating red-eye phenomenon within a miniature digital camera having a flash without the distraction of a pre-flash.
An advantage of digital capture devices is that the image contains more data than the traditional film based image has. Such data is also referred to as meta-data and is usually saved in the header of the digital file. The meta-data may include information about the camera, the user, and the acquisition parameters.
iii. Digital Scanning and Red Eye Artifacts
In many cases images that originate from analog devices like film are being scanned to create a digital image. The scanning can be either for the purpose of digitization of film based images into digital form, or as an intermediate step as part of the printing of film based images on a digital system. Red Eye phenomenon is a well known problem even for film cameras, and in particular point and shoot cameras where the proximity of the flash and the lens is accentuated. When an image is scanned from film, the scanner may have the option to adjust its scanning parameters in order to accommodate for exposure and color balance. In addition, for negative film, the scanner software will reverse the colors as well as remove the orange, film base mask of the negative.
The so-called meta data for film images is generally more limited than for digital cameras. However, most films include information about the manufacturer, the film type and even the batch number of the emulsion. Such information can be useful in evaluating the raw, uncorrected color of eyes suffering from red eye artifacts.
iv. Red-Eye Detection and Correction Algorithms
Red-eye detection algorithms typically include detecting the pupil and detecting the eye. Both of these operations may be performed in order to determine if red-eye data is red-eye or if an eye has red-eye artifact in it. The success of a red eye detection algorithm is generally dependent on the success of a correct positive detection and a minimal false detection of the two. The detection is primarily done on image data information, also referred to as pixel-data. However, there is quite a lot of a-priori information when the image is captured and the nature of the artifact that can be utilized. Such information relies on both anthropometric information as well as photographic data.
v. Anthropometry
Anthropometry is defined as the study of human body measurement for use in anthropological classification and comparison. Such data, albeit extremely statistical in nature, can provide good indication as to whether an object is an eye, based on analysis of other detected human objects in the image.
vi. Bayesian Statistics
A key feature of Bayesian methods is the notion of using an empirically derived probability distribution for a population parameter such as anthropometry. In other words, Bayesian probability takes account of the system's propensity to misidentify the eyes, which is referred to as ‘false positives’. The Bayesian approach permits the use of objective data or subjective opinion in specifying an a priori distribution. With the Bayesian approach, different individuals or applications might specify different prior distributions, and also the system can improve or have a self-learning mode to change the subjective distribution. In this context, Bayes' theorem provides a mechanism for combining an a priori probability distribution for the states of nature with new sample information, the combined data giving a revised probability distribution about the states of nature, which can then be used as an a priori probability with a future new sample, and so on. The intent is that the earlier probabilities are then used to make ever better decisions. Thus, this is an iterative or learning process, and is a common basis for establishing computer programs that learn from experience.
Mathematically,
While conditional probability is defined as:
      P    ⁡          (              A        ❘        B            )        =            P      ⁡              (                  A          ⋂          B                )                    P      ⁡              (        B        )            In Bayesian statistics:
      P    ⁡          (              A        ❘        B            )        =                    P        ⁡                  (                      B            ❘            A                    )                    ⁢              P        ⁡                  (          B          )                            P      ⁡              (        A        )            Alternatively a verbal way of representing it is:
  Posterior  =            Likelihood      ×      Prioir        Normalizing_Factor  Or with a Likelihood function L( ), over a selection of events, which is also referred to as the Law of Total Probability:
      P    ⁡          (                        B          i                ❘        A            )        =                    L        ⁡                  (                      A            ❘                          B              i                                )                    ⁢              P        ⁡                  (          B          )                                    ∑                  all          -          j                                              ⁢                        L          ⁡                      (                          A              ❘                              B                j                                      )                          ⁢                  P          ⁡                      (                          B              j                        )                              A Venn diagram is depicted in FIG. 8-b. 